<!DOCTYPE html>
<html lang="ch" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>查询</title>
    <style>
        table {
            border-collapse: collapse;
        }

        th, td {
            border: 1px #000 solid;
        }
    </style>
</head>
<body>
<label><input type="text" id="name" th:value="${name}"></label>
<button onclick='location.href="/list/"+document.getElementById("name").value'>搜索</button>
<table>
    <thead>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>年龄</th>
        <th>部门</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="e:${list}">
        <td th:text="${e.id}">编号</td>
        <td th:text="${e.name}">姓名</td>
        <td th:text="${e.sex}">性别</td>
        <td th:text="${e.age}">年龄</td>
        <td th:text="${e.dept}">部门</td>
        <td>
            <a th:href="@{/delete/{id}(id=${e.id})}">删除</a>
            <a th:href="@{/update/{id}(id=${e.id})}">修改</a>
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>